import { createBrowserRouter, Navigate } from "react-router-dom";
import Home from "../views/Home";
import Shouye from "../views/Shouye";
import Quanzi from "../views/Quanzi";
import Liaotian from "../views/Liaotian";
import My from "../views/My";
import Login from "../views/Login";

const router = createBrowserRouter([
  {
    path: "/",
    element: <Navigate to="/login" />,
  },
  {
    path: "/home",
    element: <Home />,
    children: [
      {
        path: "/home/shouye",
        element: <Shouye />,
      },
      {
        path: "/home/quanzi",
        element: <Quanzi />,
      },
      {
        path: "/home/liaotian",
        element: <Liaotian />,
      },
      {
        path: "/home/my",
        element: <My />,
      },
        ]
  },
  {
    path: "/login",
    element: <Login />,
  },
]);

export default router;

